package com.ute.chinesechess;

public class Sy extends QuanCo {

	public boolean KiemTra(int i, int j) {
		/*
		 * Di den vi tri i,j
		 * OK
		 */
		boolean turn = false;
		if ((i >= 7 && i <= 9 && j >= 3 && j <= 5)
				|| (i >= 0 && i <= 2 && j >= 3 && j <= 5)) {
			if ((i == Hang + 1 && j == Cot + 1)
					|| (i == Hang + 1 && j == Cot - 1)
					|| (i == Hang - 1 && j == Cot + 1)
					|| (i == Hang - 1 && j == Cot - 1)) {
				if (BanCo.board[i][j].Trong == true) {
					turn = true;
				} else {
					if (BanCo.board[i][j].Phe != this.Phe)
						turn = true;
				}
			}
		}
		return turn;
	}
}
